﻿
using WebSocketGateway.Helper;
using WebSocketGateway.Interface;
using WebSocketGateway.Model;

namespace WebSocketGateway.Route
{
    internal class VoidFuncApi : BasicFunc
    {
        private readonly ExecAction _Action;
        public VoidFuncApi(ApiModel param) : base(param)
        {
            this._Action = RouteHelper.GetExecAction(this._Method);
        }

        protected override void Invoke(IWebSocketService service, IApiGateway api, object[] param)
        {
            this._Action(api, param);
            service.Reply();
        }
    }
}
